Proposal for Global Variables in Standard Prolog

نویسنده

  • Katsuhiko Nakamura
چکیده

Data types of Prolog are essentially restricted to terms at the cost of compactness and the unity of a logic programming language. On the other hand, it has been commonly recognized that Prolog has two practical problems, which considerably prevent the language and logic programming from being used for broader area of information processing. One problem is that Standard Prolog does not have the direct means for efficient random access of data in a large working memory such as arrays or hash memories. The other problem is that pure Prolog has no global variables such as those in Lisp and C. The array functions are closely related to the global variables, as the values of both global variables and the array elements need to be updated. It is well known that the global variables in logic programs are converted to additional arguments. This conversion causes, however, inefficiency in program execution as well as difficulties in reading and writing programs, since the numbers of arguments need to be increased in large programs. Schachte [5] showed formal semantics for programs with the global variables and a method of transforming programs with the global variables into efficient logic programs. In general, logic programming observes the single assignment rule so that no variable is destructively assigned in usual execution. On the other hand, we need to update the values in the global variables and array elements. The logical assignment is a mechanism to compromise these two contradictory conditions, by which we can update the values of global variables and array elements

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Design and Implementation of the GNU Prolog System

In this paper we describe the design and the implementation of the GNU Prolog system. This system draws on our previous experience of compiling Prolog to C in the wamcc system and of compiling finite domain constraints in the clp(FD) system. The compilation scheme has however been redesigned in order to overcome the drawbacks of compiling to C. In particular, GNU-Prolog is based on a low-level ...

متن کامل

GNU Prolog: Beyond Compiling Prolog to C

We describe in this paper the compilation scheme of the GNU Prolog system. This system is built on our previous experience of compiling Prolog to C in wamcc. The compilation scheme has been however redesigned to overcome drawbacks of the compilation to C. In particular, GNU-Prolog is based on a low-level miniassembly platform-independent language that makes it possible to avoid the phase of com...

متن کامل

Efficient Implementation of General Negation Using Abstract Interpretation

While negation has been a very active area of research in logic programming, comparatively few papers have been devoted to implementation issues. Furthermore, the negation-related capabilities of current Prolog systems are limited. We recently presented a novel method for incorporating negation in a Prolog compiler which takes a number of existing methods (some modified and improved) and uses t...

متن کامل

Eecient Implementation of General Negation Using Abstract Interpretation

While negation has been a very active area of research in logic programming , comparatively few papers have been devoted to implementation issues. Furthermore, the negation-related capabilities of current Prolog systems are limited. We recently presented a novel method for incorporating negation in a Prolog compiler which takes a number of existing methods (some modiied and improved) and uses t...

متن کامل

Efficient Negation Using Abstract Interpretation

While negation has been a very active área of research in logic programming, comparatively few papers have been devoted to implementation issues. Furthermore, the negation-related capabilities of current Prolog systems are limited. We recently presented a novel method for incorporating negation in a Prolog compiler which takes a number of existing methods (some modified and improved by us) and ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2007